home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of MacTutor - S…e Code for Volumes 1 to 5
/
The Best of MacTutor - Source Code for Volume 1-5 (Wayzata Technology)(6031)(1990).bin
/
Source Code
/
#18 (Mar 87)
/
Fortran Runge-Kutta
/
Fortran Benchmark list
< prev
next >
Wrap
Text File
|
1987-01-29
|
5KB
|
155 lines
FORTRAN Compiler Listing 01/29/87 Page 1
Source File: Fortran Benchmark.text
Program Unit: FORTRA Entry: 00000444 Options: EILDK
00001 INTEGER ORDER
00002 DIMENSION X(6),XOLD(6),XD(6)
00003 DATA B1,B2,B3,B4,B5,B6,W0/3.86,7.46,9.13,7.46,3.86,1.,50./
00004 DATA XIN/1./
00005 ORDER=6
00006 W02=W0*W0
00007 W03=W02*W0
00008 W04=W03*W0
00009 W05=W04*W0
00010 W06=W05*W0
00011 DO 10 I=1,ORDER
00012 X(I)=0.
00013 10 CONTINUE
00014 T=0.
00015 H=.0001
00016 S=0.
00017 5 IF(T.GE..5)GOTO 999
00018 S=S+H
00019 DO 20 I=1,ORDER
00020 XOLD(I)=X(I)
00021 20 CONTINUE
00022 CALL INTEG(T,XD,X,W02,W03,W04,W05,W06)
00023 DO 30 I=1,ORDER
00024 X(I)=X(I)+H*XD(I)
00025 30 CONTINUE
00026 T=T+H
00027 CALL INTEG(T,XD,X,W02,W03,W04,W05,W06)
00028 DO 40 I=1,ORDER
00029 X(I)=(XOLD(I)+X(I))/2.+.5*H*XD(I)
00030 40 CONTINUE
00031 IF(S.GE..004999)THEN
00032 S=0.
00033 WRITE(9,*)T,X(1)
00034 ELSE
00035 END IF
00036 GOTO 5
00037 999 CONTINUE
00038 END
FORTRAN Compiler Listing 01/29/87 Page 2
Source File: Fortran Benchmark.text
Symbol and Label Tables for: FORTRA
SYMBOL TYPE ADDRESS COMMON
ORDER INTEGER 00000040
X REAL 00000044
XOLD REAL 00000074
XD REAL 00000124
B1+ REAL 00000154
B2+ REAL 00000160
B3+ REAL 00000164
B4+ REAL 00000170
B5+ REAL 00000174
B6+ REAL 00000200
W0+ REAL 00000204
XIN+ REAL 00000210
W02+ REAL 00000214
W03+ REAL 00000220
W04+ REAL 00000224
W05+ REAL 00000230
W06+ REAL 00000234
I+ INTEGER 00000240
T+ REAL 00000244
H+ REAL 00000250
S+ REAL 00000254
STORAGE MEMORY
LOCAL 176
LABEL ADDRESS LABEL ADDRESS
10 0000000736 5 0000000766
20 0000001104 30 0000001304
40 0000001572 999 0000001750
FORTRAN Compiler Listing 01/29/87 Page 3
Source File: Fortran Benchmark.text
Program Unit: INTEG Entry: 00001760 Options: EILDK
00039 SUBROUTINE INTEG(T,XD,X,W02,W03,W04,W05,W06)
00040 SAVE
00041 INTEGER ORDER
00042 DIMENSION X(6),XOLD(6),XD(6)
00043 DATA B1,B2,B3,B4,B5,B6,W0/3.86,7.46,9.13,7.46,3.86,1.,50./
00044 DATA XIN/1./
00045 ORDER=6
00046 XD(1)=X(2)
00047 XD(2)=X(3)
00048 XD(3)=X(4)
00049 XD(4)=X(5)
00050 XD(5)=X(6)
00051 XD(6)=W06*(XIN-B5*X(6)/W05-B4*X(5)/W04-B3*X(4)/W03
00052 +-B2*X(3)/W02-B1*X(2)/W0-X(1))/B6
00053 RETURN
00054 END
FORTRAN Compiler Listing 01/29/87 Page 4
Source File: Fortran Benchmark.text
Symbol and Label Tables for: INTEG
SYMBOL TYPE ADDRESS COMMON
T+ REAL DUMMY
XD REAL DUMMY
X REAL DUMMY
W02+ REAL DUMMY
W03+ REAL DUMMY
W04+ REAL DUMMY
W05+ REAL DUMMY
W06+ REAL DUMMY
ORDER INTEGER 00000000
XOLD REAL 00000004
B1+ REAL 00000034
B2+ REAL 00000040
B3+ REAL 00000044
B4+ REAL 00000050
B5+ REAL 00000054
B6+ REAL 00000060
W0+ REAL 00000064
XIN+ REAL 00000070
STORAGE MEMORY
LOCAL 60
LABEL ADDRESS LABEL ADDRESS
***** 0 errors